Skip to content

Fix bug when hanging up call#3026

Merged
sauwming merged 1 commit intomasterfrom
hangup-fix
Apr 6, 2022
Merged

Fix bug when hanging up call#3026
sauwming merged 1 commit intomasterfrom
hangup-fix

Conversation

@sauwming
Copy link
Copy Markdown
Member

There are a couple of regressions caused by #2600 and #2859 when hanging up a call:

  1. In the scenario of media transport creation still in progress, pjsua_call_hangup() will try to end the session by calling call_inv_end_session() even though it says in the log that it Will continue call %d hangup upon completion of media transport.
    One of the consequence of this regression is that it will cause assertion in Pjsua2 if Account::onIncomingCall() is not implemented:
    Assertion failed: (tdata != ((void*)0)), function pjsip_inv_end_session, file ../src/pjsip-ua/sip_inv.c, line 2805.
    In pjsua2, onIncomingCall() can be called from onCreateMediaTransport(), i.e. when media transport creation is still in progress, so ending the session prematurely causes the above assertion.

  2. Avoid double BYE when pjsua_call_hangup() is called multiple times #2859 was created to prevent sending double BYE. Unfortunately, it will also cause the continuation of call hangup in the above scenario to fail as well since the second call hangup will just be ignored.

@sauwming sauwming merged commit 189e6c0 into master Apr 6, 2022
@sauwming sauwming deleted the hangup-fix branch April 6, 2022 09:21
nanangizz pushed a commit that referenced this pull request May 10, 2022
BarryYin pushed a commit to BarryYin/pjproject that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants